home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 4_0 / BISON-TC / MAKEFILE < prev    next >
Text File  |  1989-12-30  |  3KB  |  109 lines

  1. # Makefile for bison
  2. #   Copyright (C) 1984, 1989 Bob Corbett and Free Software Foundation, Inc.
  3. # This file is part of Bison, the GNU Compiler Compiler.
  4. # Bison is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 1, or (at your option)
  7. # any later version.
  8. # Bison is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11. # GNU General Public License for more details.
  12. # You should have received a copy of the GNU General Public License
  13. # along with Bison; see the file COPYING.  If not, write to
  14. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  15.  
  16. # For sysV, you must uncomment the following lines
  17. #CFLAGS = -g -DUSG
  18. #LIBS = -lPW
  19. #and comment out the assignment of CFLAGS below.
  20. #Also, if getopt.c gives any trouble, delete it from OBJECTS.
  21. #so the system's getopt will be used.
  22.  
  23.  
  24. DESTDIR=
  25. # where the installed binary goes
  26. BINDIR = $(DESTDIR)/mit/gnu/bin
  27.  
  28. # where the parsers go
  29. PARSERDIR = $(DESTDIR)/mit/gnu/lib
  30.  
  31. # names of parser files
  32. PFILE = bison.simple
  33. PFILE1 = bison.hairy
  34.  
  35. # It is unwise ever to compile a program without symbols.
  36. CFLAGS = -g -O
  37.  
  38. PFILES = -DXPFILE=\"$(PARSERDIR)/$(PFILE)\" \
  39.      -DXPFILE1=\"$(PARSERDIR)/$(PFILE1)\"
  40.  
  41. OBJECTS = LR0.o allocate.o closure.o conflicts.o derives.o files.o    \
  42.       getargs.o gram.o lalr.o lex.o                    \
  43.       main.o nullable.o output.o print.o reader.o reduce.o symtab.o    \
  44.       warshall.o version.o                        \
  45.       getopt.o
  46.  
  47. start: bison
  48.  
  49. clean:
  50.     rm -f *.o core bison
  51.  
  52. install: bison
  53.     install bison $(BINDIR)
  54.     -cd $(PARSERDIR); rm -f $(PFILE) $(PFILE1)
  55.     cp $(PFILE) $(PFILE1) $(PARSERDIR)
  56.  
  57. bison: $(OBJECTS)
  58.     $(CC) $(LDFLAGS) -o bison $(OBJECTS) $(LIBS)
  59.  
  60. dist:    bison-dist.tar bison-dist.tar.Z
  61.  
  62. .PHONY: bison-dist.tar
  63. bison-dist.tar:
  64.     -rm -rf bison-dist
  65.     mkdir bison-dist
  66.     ln  COPYING ChangeLog Makefile REFERENCES bison.1 \
  67.         bison.simple bison.hairy \
  68.         LR0.c allocate.c closure.c conflicts.c derives.c \
  69.         files.c getargs.c gram.c lalr.c lex.c main.c nullable.c \
  70.         output.c print.c reader.c reduce.c symtab.c version.c \
  71.         warshall.c files.h gram.h lex.h machine.h new.h state.h \
  72.         symtab.h system.h types.h bison.cld build.com vmsgetargs.c \
  73.         vmshlp.mar README bison.texinfo bison.info* \
  74.       bison-dist
  75.     cp ../lib/getopt.c bison-dist
  76.  
  77.     tar chvf bison-dist.tar bison-dist
  78.  
  79. bison-dist.tar.Z: bison-dist.tar
  80.     compress < bison-dist.tar > bison-dist.tar.Z
  81.  
  82. TAGS: *.c *.h
  83.     etags *.c *.h
  84.  
  85. # This file is different to pass the parser file names
  86. # to the compiler.
  87. files.o: files.c files.h new.h gram.h
  88.     $(CC) -c $(CFLAGS) $(PFILES) files.c
  89.  
  90. LR0.o: machine.h new.h gram.h state.h
  91. closure.o: machine.h new.h gram.h
  92. conflicts.o: machine.h new.h files.h gram.h state.h
  93. derives.o: new.h types.h gram.h
  94. getargs.o: files.h
  95. lalr.o: machine.h types.h state.h new.h gram.h
  96. lex.o: files.h symtab.h lex.h
  97. main.o: machine.h
  98. nullable.o: types.h gram.h new.h
  99. output.o: machine.h new.h files.h gram.h state.h
  100. print.o: machine.h new.h files.h gram.h state.h
  101. reader.o: files.h new.h symtab.h lex.h gram.h
  102. reduce.o: files.h new.h machine.h gram.h
  103. symtab.o: new.h symtab.h gram.h
  104. warshall.o: machine.h
  105.